<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="计算引擎" name="one">
        <engineview v-if="isbool" />
      </el-tab-pane>
      <el-tab-pane label="服务监控" name="tow">
        <monitorview v-if="isbool1" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import { engineview, monitorview } from './conpoment.js'
export default {
  components: {
    engineview,
    monitorview,
  },
  data() {
    return {
      activeName: 'one',
      isbool: false,
      isbool1: false,
      tab: {
        name: 'one',
      },
    }
  },
  mounted() {
    this.handleClick(this.tab)
  },
  methods: {
    handleClick(tab, event) {
      this.activeName = tab.name
      if (this.activeName == 'one') {
        this.isbool = true
        this.isbool1 = false
      } else if (this.activeName == 'tow') {
        this.isbool = false
        this.isbool1 = true
      }
      console.log(tab, event)
    },
  },
}
</script>
<style scoped></style>
